﻿namespace Digitalmes.Domain.Entities.Mes.Calendars;

/// <summary>
/// 班组
/// </summary>
[SugarTable("cal_team")]
public sealed class CalTeam : AuditedEntity
{
    /// <summary>
    /// 班组编号
    /// </summary>
    [NotNull]
    public string? Code { get; set; }

    /// <summary>
    /// 班组名称
    /// </summary>
    [NotNull]
    public string? Name { get; set; }

    /// <summary>
    /// 班组类型（如组装、机加工、仓库等）
    /// </summary>
    public int TeamType { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    public string? Remark { get; set; }

    /// <summary>
    /// 班组成员集合。
    /// </summary>
    [Navigate(NavigateType.OneToMany, nameof(CalTeamMember.TeamId))]
    public List<CalTeamMember>? Members { get; set; }
}
